cmake_minimum_required(VERSION 3.5.1)
project(pose_post_plugin)
set(CMAKE_CXX_STANDARD 11)

add_compile_options(-std=c++11 -O3 -Wall)

option(WITH_CROSS_COMPILE "cross compile" OFF)

if (WITH_CROSS_COMPILE)
    message("cross compile")
    set(CMAKE_CXX_COMPILER "aarch64-linux-gnu-g++")
    set(LIBRARY_OUTPUT_PATH ../../cross_compiled_lib)
    include_directories(/usr/local/lynxi/include ../../../cpp)
    add_definitions(-DLYNXI_PLUGIN=1)
else()
    set(CMAKE_CXX_COMPILER "g++")
    set(LIBRARY_OUTPUT_PATH ../../lib)
    include_directories(../../../cpp)
endif()

add_library(Yolov8PosePostPlugin SHARED yolov8_pose_plugin.cpp)
